package Module;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Hashtable;

/**
 * Created by IntelliJ IDEA.
 * User: lihengfeng
 * Date: 11-5-19
 * Time: 
 * To change this template use File | Settings | File Templates.
 */
public interface StatusService extends Remote {
    public enum WorkerStatus {active, running, dead};

    public enum JobStatus {parepare, ready, running, done, failed, cancel}

    public WorkerStatus getWorkerStatus(String authCode) throws RemoteException;

    public JobStatus getJobStatus(int jobID, String authCode) throws RemoteException;
    
    public Hashtable<Integer, JobStatus> getJobsStatus(String authCode) throws RemoteException;
    
    public void clearStatus( String authCode)  throws RemoteException;
    
    public void setJobStatus(int jobID, JobStatus jobStatus, String authCode) throws RemoteException;
}
